Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: [IOBP-514] Move authorization creation request upon payment method selection #5419

Conversation

mastro993
Copy link
Contributor

@mastro993 mastro993 commented Jan 22, 2024

Short description

This PR moves the transaction creation request from the payment summary screen (WalletPaymentConfirmScreen) to the payment method selection (WalletPaymentPickMethodScreen), after the payment method selection.

List of changes proposed in this pull request

  • Refactored walletPaymentCreateTransaction action to accept an onSuccess callback
  • Added walletPaymentCreateTransaction dispatch in WalletPaymentPickMethodScreen, after Continue button press

How to test

With the io-dev-api-server, start a new payment flow from the Profile > Playgrounds > New Wallet > Payment screen. With reactotron, check that the transaction creation request is dispatched before the PSP selection screen.

@mastro993 mastro993 requested a review from a team as a code owner January 22, 2024 13:14
@pagopa-github-bot pagopa-github-bot changed the title [IOBP-514] Move authorization creation request upon payment method selection feat: [IOBP-514] Move authorization creation request upon payment method selection Jan 22, 2024
@pagopa-github-bot
Copy link
Collaborator

pagopa-github-bot commented Jan 22, 2024

Affected stories

  • 🌟 IOBP-514: Effettuare chiamata di newTransaction subito dopo che il metodo viene selezionato
    subtask of
    • 🌟 IOBP-321: Selezione del metodo di pagamento

Generated by 🚫 dangerJS against d9b34fb

Copy link

codecov bot commented Jan 22, 2024

Codecov Report

Attention: 35 lines in your changes are missing coverage. Please review.

Comparison is base (71ca2a2) 47.45% compared to head (ffecef2) 47.43%.
Report is 1 commits behind head on master.

❗ Current head ffecef2 differs from pull request most recent head d9b34fb. Consider uploading reports for the commit d9b34fb to get more accurate results

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #5419      +/-   ##
==========================================
- Coverage   47.45%   47.43%   -0.03%     
==========================================
  Files        1603     1603              
  Lines       33618    33637      +19     
  Branches     8211     8219       +8     
==========================================
+ Hits        15953    15955       +2     
- Misses      17607    17624      +17     
  Partials       58       58              
Files Coverage Δ
...aga/networking/handleWalletPaymentCalculateFees.ts 88.88% <100.00%> (ø)
...networking/handleWalletPaymentCreateTransaction.ts 85.71% <100.00%> (+1.09%) ⬆️
...tures/walletV3/payment/store/actions/networking.ts 100.00% <ø> (ø)
...tV3/payment/screens/WalletPaymentConfirmScreen.tsx 11.11% <0.00%> (+2.02%) ⬆️
...features/walletV3/payment/store/selectors/index.ts 41.66% <25.00%> (-2.09%) ⬇️
...tV3/payment/screens/WalletPaymentPickPspScreen.tsx 3.22% <0.00%> (-0.42%) ⬇️
.../payment/screens/WalletPaymentPickMethodScreen.tsx 8.04% <0.00%> (-1.42%) ⬇️

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e300141...d9b34fb. Read the comment docs.

@mastro993 mastro993 force-pushed the IOBP-514-effettuare-chiamata-di-new-transaction-subito-dopo-che-il-metodo-viene-selezionato branch from 5a9eee8 to a067827 Compare January 22, 2024 14:09
…ction-subito-dopo-che-il-metodo-viene-selezionato
…ction-subito-dopo-che-il-metodo-viene-selezionato
…ction-subito-dopo-che-il-metodo-viene-selezionato
…ction-subito-dopo-che-il-metodo-viene-selezionato
…ction-subito-dopo-che-il-metodo-viene-selezionato
Copy link
Contributor

@Hantex9 Hantex9 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

…ction-subito-dopo-che-il-metodo-viene-selezionato
…ction-subito-dopo-che-il-metodo-viene-selezionato
@mastro993 mastro993 merged commit dffbbc0 into master Jan 25, 2024
6 checks passed
@mastro993 mastro993 deleted the IOBP-514-effettuare-chiamata-di-new-transaction-subito-dopo-che-il-metodo-viene-selezionato branch January 25, 2024 10:17
mastro993 added a commit that referenced this pull request Jan 25, 2024
…uest (#5423)

Depends on #5419

## Short description
This PR add the handling of payment dismissal after payment
authorization request

## List of changes proposed in this pull request
- Added `onDismiss` in `useWalletPaymentAuthorizationModal` hook
- Added outcome screen navigation on authorization dismissal

## How to test
Start a new payment flow from **Profile > Playgrounds > New Wallet >
Payment**, dismiss the authorization webview in the last step and check
that the payment is correctly cancelled.

## Previews


https://github.com/pagopa/io-app/assets/6160324/09a9ee38-3134-4053-8b4b-e5b6aa08b6ee

---------

Co-authored-by: Alessandro Izzo <[email protected]>
Co-authored-by: Alessandro Izzo <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
IO-Bonus e pagamenti IO - Bonus e pagamenti
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants